﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Computer_Manager.DAL;
using Computer_Manager.DTO;

namespace Computer_Manager.BUS
{
    class BUS_customer
    {
        DAL_customer dal = new DAL_customer();

        public void customer_insert(DTO_customer obj)
        {
            try
            {
                dal.customer_insert(obj);
            }
            catch (Exception)
            {

                throw;
            }

        }

        public void customer_Update(DTO_customer obj)
        {
            try
            {
                dal.customer_Update(obj);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public void customer_Delete(DTO_customer obj)
        {
            try
            {
                dal.customer_Delete(obj);
            }
            catch (Exception)
            {

                throw;
            }
        }

        public DataTable GetByID(DTO_customer obj)
        {
            DataTable dt = new DataTable();
            try
            {
                dt = dal.GetByID(obj);
            }
            catch (Exception)
            {

                throw;
            }
            return dt;
        }

        public DataTable GetByType(DTO_customer obj)
        {
            DataTable dt = new DataTable();
            try
            {
                dt = dal.GetByType(obj);
            }
            catch (Exception)
            {

                throw;
            }
            return dt;
        }


        public DataTable GetAll()
        {
            DataTable dt = new DataTable();
            try
            {
                dt = dal.GetAll();

            }
            catch (Exception)
            {

                throw;
            }
            return dt;
        }
    }
}
